import { connect } from 'react-redux';
import * as actions from './actions';
import * as actionTypes from './consts';
import {{Module}} from './components/{{Module}}';

const { props } = actionTypes.key;
const mapStateToProps = state => ({
  /** 全局loading标记 */
  loading: state.loading,
  /** 全局error标记 */
  error: state.error,
  /** redux 数据 赋值给 props */
  props: state.{{module}}.get(props),
});

const mapDispatchToProps = {
  /** 获取接口数据 */
  method: actions.method,
};

export default connect(mapStateToProps, mapDispatchToProps)({{Module}});
